package com.dg.cuckoo.admin.repository;

import com.dg.cuckoo.admin.dto.proCarryOut.ProExpendDto;
import com.dg.cuckoo.core.BaseRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProExpendRepository extends BaseRepository<ProExpendDto,String> {

    List<ProExpendDto> findByProjectIdAndType(String projectId,Integer type);

    @Query(value = "select * from pro_expend where type=? and project_id=? limit ?,?",nativeQuery = true)
    List<ProExpendDto> page(Integer type, String projectId, Integer page, Integer pageSize);

    List<ProExpendDto> findByProjectId(String projectId);
}
